package graph.geometricshapes
{	
	public class GeometricRoundedShapeFactory extends GeometricShapeFactory
	{
		public static function createShape(shapeName:String, width:Number, height:Number, cornerRadius:Number):GeometricShape
	    {
	    	// try to create geometric shape with base GeometricShape Factory
	    	var geomShape:GeometricShape = GeometricShapeFactory.createShape(shapeName, width, height);
	    	if (geomShape != null)
	    	{
	    		return geomShape;
	    	}
	    	
	    	switch(shapeName)
	    	{
	    		case GeometricRoundedRectangle.NAME:
	    			geomShape = new GeometricRoundedRectangle(width, height, cornerRadius);
	    			break;
	    	}
	    	return geomShape;
	    }
	}
}